﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FBA.Client.Data
{
    public partial class LoadingEvent
    {
        public enum LoadingEventType { Start,Finish,Success,Failed}

        public LoadingEvent(string id, LoadingEventType type)
        {
            this.Id = id;
            this.Type = type;
        }

        public LoadingEvent(string id, LoadingEventType type, string message)
        {
            this.Id = id;
            this.Type = type;
            this.Message = message;
        }

        public LoadingEvent(string id, LoadingEventType type, string message, long duration)
        {
            this.Id = id;
            this.Type = type;
            this.Message = message;
            this.Duration = duration;
        }

        public LoadingEvent(string id, LoadingEventType type, long duration)
        {
            this.Id = id;
            this.Type = type;
            this.Duration = duration;
        }

        //加载的对象的身份标识符
        public string Id { get; set; }
        //加载事件类型
        public LoadingEventType Type { get; set; }
        //加载消息
        public string Message { get; set; }
        //加载耗时（毫秒）
        public long Duration { get; set; }
    }
}
